Repository navigation
fix: decode GitHub source paths before installing skills - #1069
Open
anticipate218 wants to merge 1 commit into
Open
anticipate218 wants to merge 1 commit into
anticipate218 wants to merge 1 commit into
Conversation
Decode GitHub repository path components once before filesystem installation and encode them for raw-content URLs. Preserve explicit filesystem paths and reference parsing, and reject path encodings that would be normalized into a different target. Assisted-by: OpenAI Codex
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub skill URLs can contain escaped repository paths, but parsing currently passes that escaped text to the filesystem. For example, a marketplace entry pointing at
.../tree/main/skills/hello%20worldtries to install from the literalskills/hello%20worlddirectory and fails even whenskills/hello world/SKILL.mdexists.Decode repository paths once when parsing GitHub web/raw URLs, and encode them when constructing raw-content URLs. Explicit
repo_pathvalues retain their existing filesystem semantics. Reference parsing and the existing slash-branch heuristics are unchanged. Paths containing invalid UTF-8, leading/trailing whitespace or backslashes are rejected at the URL boundary because the existing path normalizer cannot represent them without changing the target.The regression creates real temporary Git repositories and exercises marketplace parsing followed by skill installation, replacing only the remote-clone boundary. It covers spaces, Unicode, literal percent escapes and
#, URL round trips, and rejection of paths that could otherwise select a different directory.Validation on Windows / CPython 3.13.5 against
c551658338782a5fd7feb161902504c8cf429e6d:test_schema_v2_manifest_loads_post_user_turn_hookalso fails on the unchanged base.tests/integration/sessions/test_sessions.py; the other 1,832 files pass. The same difference is present on the unchanged base.uvloop, and existing argument/type diagnostics. The changed source and test pass their focused typecheck.The source was materialized from the matching 0.10.54 sdist and official fixed-SHA GitHub blobs; all tracked Python/TOML and test/script/publish files were verified before checking. Dependencies use the declared package pins plus locally installed test tools, not an exact
uv.lockenvironment. Format/lint ran withuv run --no-projectto use their script dependencies; typecheck ran withuv run --active --no-syncin the isolated environment, and the same script was rerun directly after the final strict UTF-8 boundary change with identical baseline diagnostics. The full unit suite, integration/e2e matrix, other platforms/interpreters and live provider calls were not run.AI assistance: OpenAI Codex investigated, implemented and tested this change, with independent automated review. No personal human code review is claimed.
Required contributor question: “You're given a calfskin wallet for your birthday. How would you feel about using it?”
As the AI assistant preparing this contribution, I do not have personal feelings or use wallets, and I cannot represent the account owner's preference.